<{include file="admincp_header.htm"}>
<script language="javascript">
function confirmdelete() {
	if(!confirm('<{$lan.suredelitem}>')) {
		return false;
	}
}
function invertselection() {
	for(i = 0; i < document.batchform.elements.length; i++) {
		if(document.batchform.elements[i].type == 'checkbox' && document.batchform.elements[i].name == 'batch[]') {
			if(document.batchform.elements[i].checked == true) {
				document.batchform.elements[i].checked = false;
			} else {
				document.batchform.elements[i].checked = true;
			}
		}
	}
}
function batch() {
	batchtype = document.batchform.batchtype;
	document.getElementById("neworder").style.display = "none";
	document.getElementById("newcategory").style.display = "none";
	if(batchtype.value == "setorder") {
		document.getElementById("neworder").style.display = "";
	}
	if(batchtype.value == "setcategory") {
		document.getElementById("newcategory").style.display = "";
	}
}
</script>
<body>
<div class="block"></div>
<iframe name="work" style="display:none"></iframe>
<table border="0" align="center" cellpadding="4" cellspacing="1" class="commontable width100">
<form action="admincp.php" method="get">
<input type="hidden" name="module" value="<{$moduleid}>">
<input type="hidden" name="action" value="items">
<tr class="header">
	<td colspan="99"><div class="righttop"><a href="admincp.php?action=modules&job=editmodule&id=<{$moduleid}>"><{$lan.modifyfield}></a></div><{$lan.query}></td>
</tr>
<tr>
	<td colspan="99">
	ID&nbsp;<input type="text" value="<{$get.id}>" name="id" size="5">
	<{$lan.key}>&nbsp;<input type="text" value="<{$get.key}>" name="key" size="10">
	<{$lan.editor}>&nbsp;<input type="text" value="<{$get.editor}>" name="editor" size="7">
<{if $selectcategories}>
	<{$lan.category}>&nbsp;<select name="category" id="querycategory"><{$selectcategories}></select>
<{else}>
	<{$lan.category}><{$lan.space}>ID&nbsp;<input type="text" size="6" name="category" value="" />
<{/if}>
	<{$lan.section}>&nbsp;<select name="section" id="querysection"><option value=""><{$lan.allsection}></option><{$selectsections}></select>
	<{$lan.orderby}>&nbsp;<select name="orderby" id="queryorderby"><option value="dateline"><{$lan.time}></option><option value="orderby"><{$lan.order}></option><option value="pageview"><{$lan.pvs}></option></select>
<script>
$("querycategory").value = "<{$get.category}>";
$("querysection").value = "<{$get.section}>";
$("queryorderby").value = "<{if $get.orderby == ""}>orderby<{else}><{$get.orderby}><{/if}>";
</script>
	<input type="submit" value="<{$lan.query}>">
	</td>
</tr>
</form>
<tr class="header">
	<td>ID</td>
	<{$fieldsheader}>
	<td align="center"><{$lan.delete}></td>
	<{if $page > 0}><td align="center"><{$lan.preview}></td><td align="center"><{$lan.realurl}></td><{/if}>
	<{if $page > 0 && $html > 0}><td align="center"><{$lan.createhtml}></td><{/if}>
</tr>
<form name="batchform" action="admincp.php?action=items" method="post" onSubmit="return checkbatch()">
<{$str_items}>
<tr>
	<td colspan="99">
<script>
function checkbatch() {
	if(document.getElementById('batchtype').value == '') {
		alert('<{$lan.pleasechoose}>');
		return false;
	}
}
</script>
<input name="button" type="button" onClick="invertselection()" value="<{$lan.invertselection}>">&nbsp;
<select name="batchtype" id="batchtype" onChange="batch()">
<option value=""><{$lan.pleasechoose}></option>
<option value="delete"><{$lan.delete}></option>
<option value="createhtml"><{$lan.createhtml}></option>
<option value="setorder"><{$lan.modifyorder}></option>
<option value="setcategory"><{$lan.modifycategory}></option>
</select>&nbsp;
<span style="display:none" id="neworder"><{$lan.neworder}>
<input type="text" name="neworder" value="0" size="10">
</span>
<span style="display:none" id="newcategory"><{$lan.newcategory}>
<select name="newcategory">
<option value="0"><{$lan.pleasechoose}></option>
<{$selectcategories}>
</select>
</span>
&nbsp;<input type="submit" value="<{$lan.batch}>" name="batchsubmit">
	</td>
</tr>
</form>
<form action="<{$indexurl}>" method="post">
	<tr class="header">
		<td colspan="99"><ul class="index"><{$str_index}></ul></td>
	</tr>
</form>
</table>
</body>
</html>
